#include "Driver_Delay.h"
#include "Driver_Flash.h"
#include "Driver_Gpio.h"
#include "Driver_Systime.h"
#include "Driver_Uart.h"
#include "Task.h"

int main(void)
{
  RCC->AHBENR |= RCC_AHBENR_GPIOAEN | RCC_AHBENR_GPIOBEN | RCC_AHBENR_GPIOFEN;
  SysTim_Init_Fuc();
  LoopTim_Init_Fuc();
  Gpio_Init_Fuc();
  ComPort_Uart_Init_Fuc();
  Delay_Ms(500);
  Task_Init(TASK_ID_COMMUNICATION, -1, 50, Communication_Test_Handler); // -1表示无数次，50是执行函数的周期
  LoopTim_Irq_Enable_Fuc();                                             // 开启TASK
  while (1)
  {
    Task_Running();
  }
}
